package domain

import "time"

type MessageRead struct {
	MessageID int64     `json:"message_id" gorm:"primary_key"`
	UserID    int64     `json:"user_id" gorm:"primary_key"`
	User      *User     `json:"user,omitempty" gorm:"foreignKey:UserID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	Message   *Message  `json:"message,omitempty" gorm:"foreignKey:MessageID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	CreatedAt time.Time `json:"created_at"`
}

type MessageReadDTO struct {
	MessageID int64       `json:"message_id" gorm:"primary_key"`
	UserID    int64       `json:"user_id" gorm:"primary_key"`
	User      *UserDTO    `json:"user,omitempty" gorm:"foreignKey:UserID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	Message   *MessageDTO `json:"message,omitempty" gorm:"foreignKey:MessageID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	CreatedAt time.Time   `json:"created_at"`
}
